/*
 *  CSE 40166, Computer Graphics, Fall 2013
 *
 *  PORT
 *  File: vehicle.h
 *
 *  Kevin Sonnen
 *
 *  Description: Abstract class representing a vehicle. Includes functionality
 *  for changing position/velocity mainly
 *
 */
 
#ifndef VEHICLE_H
#define VEHICLE_H

#include <vector>

#ifdef __APPLE__			// If compiling on Mac OS
	#include <GLUT/glut.h>
#else					// Else compiling on Linux OS
	#include <GL/glut.h>
	#include <GL/gl.h>
	#include <GL/glu.h>
#endif

#include <math.h>

class vehicle {
	public:		
		virtual void draw() = 0;	// Abstract function to be overriden by derived classes
		
		
		void setPosition(const std::vector<float> &newPosition);
		std::vector<float> getPosition();
		
		void moveForward();
		void moveBackward();
		void moveLeft();
		void moveRight();
		
		void stopVertical();
		void stopHorizontal();
		
		void setVelocity(const std::vector<float> &newVelocity);
		std::vector<float> getVelocity();
		
		float vehicleSpeed;	// Speed that the vehicle moves if it's moving
		
		float radius;		// The radius of the vehicle, used for collisions
		
		void setRotation(const float & newRotation);
		//void rotateLeft();
		//void rotateRight();
		//void stopRotation();
		//float getRotation();
		//float rotationSpeed;	// Speed that the vehicle rotates at if it's rotating
		//float getRotationVelocity();
	protected:
		std::vector<float> position;	// Current position (x,y)
		std::vector<float> velocity;	// Current velocity (x,y)
		float rotationAngle;		// Current angle (radians)
		//float rotationVelocity;		// Current velocity of rotation change
};

#endif
